const Router = require("koa-router");
const {
  createAddress,
  gainAddressList,
  gainOneAddress,
  updateAddress,
  removeAddress,
} = require("../controller/contact.controller");

const contactRouter = new Router({ prefix: "/contact" });

// 创建收件地址
contactRouter.post("/create", createAddress);

// 查询收件地址列表
contactRouter.get("/list", gainAddressList);

// 查询单个收件地址
contactRouter.get("/getOne", gainOneAddress);

// 更新收件地址
contactRouter.post("/update", updateAddress);

// 删除收件地址
contactRouter.post("/delete", removeAddress);

module.exports = contactRouter;
